package runners;

import tester.cobertura.Instrument;

/**
 * It is a Runner....
 * @author Adam
 */
@Instrument
public class Runner {
	public enum Gender {MALE, FEMALE}; // Playing... Worked!
	private String name;
	private Gender gender;
	private int age;
	private int bib;
	private int st;
	private int et;
	
	// Constructor
	/**
	 * @param name Name of runner.
	 * @param gender Gender of runner.
	 * @param age Age of runner.
	 * @param bib Bib number of runner.
	 * @param st Starting time of runner, in minutes.
	 * @param et Ending time of runner, in minutes.
	 */
	public Runner(String name, Gender gender, int age, int bib, int st, int et){
		this.name = name;
		this.gender = gender;
		this.age = age;
		this.bib = bib;
		this.st = st;
		this.et = et;
	}
	
	/**
	 * @return the total time spent running.
	 */
	public int totalTime(){
		return this.et - this.st;
	}
	
	/**
	 * @return the String that represents the runner.
	 */
	public String toString(){
		return this.name + "-" + Integer.toString(this.bib);
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the gender
	 */
	public Gender getGender() {
		return gender;
	}

	/**
	 * @return the age
	 */
	public int getAge() {
		return age;
	}

	/**
	 * @return the bib
	 */
	public int getBib() {
		return bib;
	}

	/**
	 * @return the st
	 */
	public int getSt() {
		return st;
	}

	/**
	 * @return the et
	 */
	public int getEt() {
		return et;
	}
}